class CarpoolOrderInfo {
  String orderId;
  String depCity;
  String depLongitude;
  String depLatitude;
  String depAre = '';
  String destCity;
  String destLongitude;
  String destLatitude;
  String destArea = '';
  String departureDate = ''; // 出发时间
  String driverId;
  num seatNum = 0; // 乘坐人数
  String rideType = '';
  String unitprice = ''; //单价
  String totalprice = ''; //总价
  String state; //0000->订单开启 0010->订单关闭
  String driverName = ''; // 司机名称
  String driverPhone = ''; // 司机手机号
  String vehicleNo = ''; // 司机车辆车牌号
  String brand = ''; // 车辆品牌
  String vehicleColor = ''; // 车辆颜色
  String carImg; // 车辆图片

  CarpoolOrderInfo({
    this.orderId,
    this.depCity,
    this.depLongitude,
    this.depLatitude,
    this.depAre,
    this.destCity,
    this.destLongitude,
    this.destLatitude,
    this.destArea,
    this.departureDate,
    this.driverId,
    this.seatNum,
    this.rideType,
    this.driverName,
    this.driverPhone,
    this.vehicleNo,
    this.brand,
    this.vehicleColor,
    this.carImg,
    this.unitprice,
    this.totalprice,
    this.state,
  });

  CarpoolOrderInfo.fromJson(Map<String, dynamic> json) {
    orderId = json['order_id'];
    depCity = json['dep_city'];
    depLongitude = json['dep_longitude'];
    depLatitude = json['dep_latitude'];
    depAre = json['dep_are'];
    destCity = json['dest_city'];
    destLongitude = json['dest_longitude'];
    destLatitude = json['dest_latitude'];
    destArea = json['dest_area'];
    departureDate = json['departure_date'];
    driverId = json['driver_id'];
    seatNum = json['seat_num'];
    rideType = json['ride_type'];
    driverName = json['driver_name'];
    driverPhone = json['driver_phone'];
    vehicleNo = json['vehicle_no'];
    brand = json['brand'];
    vehicleColor = json['vehicle_color'];
    carImg = json['car_img'];
    unitprice = json['unit_price'];
    totalprice = json['total_price'];
    state = json['state'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['order_id'] = this.orderId;
    data['dep_city'] = this.depCity;
    data['dep_longitude'] = this.depLongitude;
    data['dep_latitude'] = this.depLatitude;
    data['dep_are'] = this.depAre;
    data['dest_city'] = this.destCity;
    data['dest_longitude'] = this.destLongitude;
    data['dest_latitude'] = this.destLatitude;
    data['dest_area'] = this.destArea;
    data['departure_date'] = this.departureDate;
    data['driver_id'] = this.driverId;
    data['seat_num'] = this.seatNum;
    data['ride_type'] = this.rideType;
    data['driver_name'] = this.driverName;
    data['driver_phone'] = this.driverPhone;
    data['vehicle_no'] = this.vehicleNo;
    data['brand'] = this.brand;
    data['vehicle_color'] = this.vehicleColor;
    data['car_img'] = this.carImg;
    data['unit_price'] = this.unitprice;
    data['total_price'] = this.totalprice;
    data['state'] = this.state;
    return data;
  }
}
